const vm = new Vue({
  el: '#app',
  data: {
    code: getUrlParam('code'),
    legalbasis: []
  },
  created() {
    this.init()
  },
  methods: {
    init() {
      let data = sessionStorage.getItem('legalbasis');
      if (data) {
        data = JSON.parse(data);
        this.legalbasis = data;
        return
      }
      this.getDetail()
    },
    getDetail(){
      this.loading = true;
      api.requestGetXzspjPermission({
        "action": "getPermission",
        "pagemode": "serverV3P5",
        "itemCode": this.code,
      }).then((res) => {
        if(res.success){
          this.legalbasis = res.data.legalbasis;
        }
      })
    },
  }
});
